package arabicScrabble;

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import java.awt.BorderLayout;
import java.awt.Container.*;
import javax.swing.*;
import javax.swing.event.*;
//import java.lang.NullPointerException.*;


@SuppressWarnings("unused")
public class Game extends JFrame{
	
	
//	private static final String String = null;

	JFrame mainFrame;
	
	//Container mainContainer;
	
//	BorderLayout mainFrameBorderlayout;
	//GridLayout gridLayout1;
	
	JPanel mainFrameNorthPnl;
	JPanel mainFrameEastPnl;
	JPanel mainFrameSouthPnl;
	JPanel mainFrameWestPnl;
	JPanel mainFrameCenterPnl;
	
	JButton newGameBtn;
	JButton rulesBtn;
	JButton dictionaryBtn;
	JButton endGameBtn;
	JButton playBtn;
	JButton changeTilesBtn;
	JButton passBtn;
	
	JLabel player1StatusLbl;
	JLabel player2StatusLbl;
	JLabel player3StatusLbl;
	JLabel player4StatusLbl;
	
	
	public Game(){
		
	super("Arabic Scrabble SUPER!");
	this.setSize(600,500);
	
	mainFrame = new JFrame("Arabic Scrabble");
	mainFrame.setSize(600,500);
	//mainContainer = mainFrame.getContentPane();
	//mainFrameBorderlayout = new BorderLayout();
	//mainContainer.setLayout(mainFrameBorderlayout);
	
	mainFrameNorthPnl = new JPanel(); // North Panel 
	mainFrameEastPnl = new JPanel(); // East Panel 
	mainFrameSouthPnl = new JPanel(); // South Panel
	mainFrameWestPnl = new JPanel(); // West Panel
	mainFrameCenterPnl = new JPanel(); // Center Panel
	
	mainFrameNorthPnl.setLayout(new GridLayout(1,4));
	mainFrameEastPnl.setLayout(new GridLayout(4,1));
	mainFrameSouthPnl.setLayout(new GridLayout(3,1));
	//mainFrameWestPnl.setLayout(new GridLayout(0,0));
	//mainFrameCenterPnl.setLayout(new GridLayout(1,1));
	
	newGameBtn = new JButton("New Game");
	rulesBtn = new JButton("Rules");
	dictionaryBtn = new JButton("Dictionary");
	endGameBtn = new JButton("End Game");
	playBtn = new JButton("Play");
	changeTilesBtn = new JButton("Change Tiles");
	passBtn = new JButton("Pass");
	
	player1StatusLbl = new JLabel("Player 1" /* + playerName + score*/ + "Points:");
	player2StatusLbl = new JLabel("Player 2" /* + playerName + score*/ + "Points:");
	player3StatusLbl = new JLabel("Player 3" /* + playerName + score*/ + "Points:");
	player4StatusLbl = new JLabel("Player 4" /* + playerName + score*/ + "Points:");
	

	this.getContentPane().setLayout(new BorderLayout());
	//mainFrame.getContentPane().add(mainFrameNorthPnl, BorderLayout.NORTH);
	mainFrame.getContentPane().add(mainFrameSouthPnl, BorderLayout.SOUTH);
	mainFrame.getContentPane().add(mainFrameEastPnl, BorderLayout.EAST);
	mainFrame.getContentPane().add(mainFrameWestPnl, BorderLayout.WEST);
	mainFrame.getContentPane().add(mainFrameCenterPnl, BorderLayout.CENTER);
	
	  
	
	//this.add(mainContainer);
	this.add(mainFrameNorthPnl, BorderLayout.NORTH);
	this.add(mainFrameEastPnl, BorderLayout.EAST);
	this.add(mainFrameSouthPnl);
	this.add(mainFrameWestPnl);
	
	
	/*mainContainer.add(mainFrameNorthPnl	);
	mainContainer.add(mainFrameSouthPnl);
	mainContainer.add(mainFrameEastPnl);
	mainContainer.add(mainFrameWestPnl);*/
	
	
	mainFrameNorthPnl.add(newGameBtn);
	mainFrameNorthPnl.add(rulesBtn);
	mainFrameNorthPnl.add(dictionaryBtn);
	mainFrameNorthPnl.add(endGameBtn);
	
	mainFrameEastPnl.add(player1StatusLbl, BorderLayout.EAST);
	mainFrameEastPnl.add(player2StatusLbl, BorderLayout.EAST);
	mainFrameEastPnl.add(player3StatusLbl, BorderLayout.EAST);
	mainFrameEastPnl.add(player4StatusLbl, BorderLayout.EAST);
	
	mainFrameWestPnl.add(playBtn, BorderLayout.WEST);
	mainFrameWestPnl.add(changeTilesBtn, BorderLayout.WEST);
	mainFrameWestPnl.add(passBtn, BorderLayout.WEST);
	
	this.pack();
	this.setVisible(true);
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	
	this.setContentPane(mainFrameNorthPnl);
	
	mainFrameNorthPnl.setVisible(true);
	mainFrameEastPnl.setVisible(true);
	mainFrameSouthPnl.setVisible(true);
	mainFrameWestPnl.setVisible(true);
	
	
	
	
	}
	
	public static void main(String[] args){
	JFrame mainFrame = new Game();

		
	}

}
